package com.sz.jinzheng.mapper;

import com.sz.jinzheng.model.StaffExmination;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface StaffExminationMapper {
    int addStaffExmination(StaffExmination staffExmination);

    /**
     * 更新StaffExmination
     *
     * @param staffExmination
     * @return
     */
    int updateStaffExmination(StaffExmination staffExmination);

    /**
     * 查询出对应状态的任务详情
     *
     * @param staffExmination
     * @return
     */
    StaffExmination getStaffExminationByKey(StaffExmination staffExmination);

    /**
     * 通过id查询
     *
     * @param id
     * @return
     */
    StaffExmination getStaffExminationById(Integer id);

    /**
     * 通过用户id跟任务id查询(保证一个人每个任务只能参与一次)
     *
     * @param staffExmination
     * @return
     */
    Integer getStaffExminationByUid(StaffExmination staffExmination);

    /**
     * 通过用户id查询到已完成的任务
     *
     * @param staffMemberId
     * @return
     */
    List<StaffExmination> getMyCompleteStaffExmination(Integer staffMemberId);
    /**
     * 通过用户id查询到待完成的任务
     *
     * @param staffMemberId
     * @return
     */
    List<StaffExmination> getMyCompletingStaffExmination(Integer staffMemberId);
}
